package cn.usian.basicInformation.car.controller;

import cn.usian.basicInformation.car.service.ICarTypeService;
import cn.usian.pojo.Result;
import cn.usian.pojo.basicInformation.car.CarType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carType")
public class CarTypeController {
    @Autowired
    private ICarTypeService carTypeService;

    @GetMapping("/list")
    public Result list() {
        List<CarType> carTypeList = carTypeService.list();
        return Result.ok(carTypeList);
    }

}
